package com.srd.phone.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;

import com.shengrongdai.srd.R;
import com.srd.phone.activity.RegisterEnterpriseTypeActivity;

/**
 * 企业注册
 */
public class RegisterEnterpriseFragment extends BaseFragment implements View.OnClickListener {

    private View rootView;
    private EditText et_user; //用户名
    private EditText et_credit; //社会信用代码
    private EditText et_enterprise_people; //请填写您的姓名
    private EditText et_enterprise_phone; //您的手机号
    private EditText et_verify; //短信验证码
    private Button bt_sms;
    private EditText et_login_pwd; //登录密码
    private EditText et_login_affirm_pwd; //确认登录密码
    private Button bt_enterprise_approve;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        if (rootView == null) {
            rootView = inflater.inflate(R.layout.fragment_register_enterprise, container, false);
            initView();
        }
        return rootView;
    }

    @Override
    public void initView() {
        et_user = (EditText) rootView.findViewById(R.id.et_user);
        et_credit = (EditText) rootView.findViewById(R.id.et_credit);
        et_enterprise_people = (EditText) rootView.findViewById(R.id.et_enterprise_people);
        et_enterprise_phone = (EditText) rootView.findViewById(R.id.et_enterprise_phone);
        et_verify = (EditText) rootView.findViewById(R.id.et_verify);
        et_login_pwd = (EditText) rootView.findViewById(R.id.et_login_pwd);
        et_login_affirm_pwd = (EditText) rootView.findViewById(R.id.et_login_affirm_pwd);
        bt_sms = (Button) rootView.findViewById(R.id.bt_sms);
        bt_sms.setOnClickListener(this);
        bt_enterprise_approve = (Button) rootView.findViewById(R.id.bt_enterprise_approve);
        bt_enterprise_approve.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.bt_enterprise_approve:
                startActivity(new Intent(mContext, RegisterEnterpriseTypeActivity.class));
                break;
        }
    }
}
